package org.jeecg.modules.basic.material.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.basic.material.entity.BasicMaterial;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Description: 物料信息管理
 * @Author: jeecg-boot
 * @Date:   2023-07-27
 * @Version: V1.0
 */
public interface IBasicMaterialService extends IService<BasicMaterial> {

	/**
	 * 分页查询物料
	 * @return
	 */
	Page<BasicMaterial> listMaterialByPage(Page<BasicMaterial> page, BasicMaterial basicMaterial);

	/**
	 * 根据物料编码查询物料信息
	 * @param code
	 * @return
	 */
	BasicMaterial getByCode(String code);

	/**
	 * 导入
	 * @param request
	 */
	Result<String> importExcel(HttpServletRequest request);

	void updateUsedState(String materialId);

	void stockWarning(String moveReceiptId);

	/**
	 * 根据物料编码查询物料信息
	 * @param code
	 * @return
	 */
	List<BasicMaterial> listByCode(String code);
}
